package ui;

import javax.swing.*;
import java.awt.*;

public class MainFrame extends JFrame {
    private JTabbedPane tabbedPane;
    
    public MainFrame() {
        setTitle("学生管理系统");
        setSize(800, 600);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
        
        initComponents();
    }
    
    private void initComponents() {
        tabbedPane = new JTabbedPane();
        
        // 添加各个模块的面板
        tabbedPane.addTab("班级管理", new ClassManagementPanel());
        tabbedPane.addTab("小组管理", new GroupManagementPanel());
        tabbedPane.addTab("学生管理", new StudentManagementPanel());
        tabbedPane.addTab("随机点名", new RandomCallPanel());
        
        add(tabbedPane);
    }
    
    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            new MainFrame().setVisible(true);
        });
    }
} 